#ifndef _MOUSE_H
#define _MOUSE_H

#include <windows.h>

#include "StringUtils.h"
#include "Logger.h"
#include "MouseButtons.h"
#include "MouseButtonState.h"
#include "Coordinate.h"
#include "GameInfo.h"

#ifdef GALLIUMENGINE_DLL 
#define GALLIUMENGINE_API __declspec( dllexport )
#else
#define GALLIUMENGINE_API __declspec( dllimport )
#endif

namespace GalliumEngine
{

	class Mouse
	{
	private:
		static MouseButtonStates::MouseButtonState States[MouseButtons::ButtonsCount];
		static MouseButtonStates::MouseButtonState PreviousStates[MouseButtons::ButtonsCount];
		static HWND handle;
		static Coordinate mouseDelta;
		static short mouseWheelDelta;
	public:
		GALLIUMENGINE_API static void initialize(HWND hWnd);
		GALLIUMENGINE_API static void updateButtonState(MouseButtons::MouseButton button, bool down);
		GALLIUMENGINE_API static void update(RAWMOUSE& InputData);
		GALLIUMENGINE_API static Coordinate getPosition();

		GALLIUMENGINE_API static bool isButtonUp(MouseButtons::MouseButton b);
		GALLIUMENGINE_API static bool isButtonDown(MouseButtons::MouseButton b);
		GALLIUMENGINE_API static bool isButtonHeld(MouseButtons::MouseButton b);
		GALLIUMENGINE_API static bool isButtonReleased(MouseButtons::MouseButton b);

		GALLIUMENGINE_API static bool wasButtonUp(MouseButtons::MouseButton b);
		GALLIUMENGINE_API static bool wasButtonDown(MouseButtons::MouseButton b);
		GALLIUMENGINE_API static bool wasButtonHeld(MouseButtons::MouseButton b);
		GALLIUMENGINE_API static bool wasButtonReleased(MouseButtons::MouseButton b);
	};

}

#endif
